package edu.sctu.xialei.May.day20150527one;

import java.util.HashMap;

/**
 * Created by Administrator on 5/27/2015.
 */
public class DiningAllInfo {

//    餐厅信息
    public DiningRoom setInfo() {
        DiningRoom diningRoom = new DiningRoom();

//        餐厅名字
        diningRoom.name = "天篱园";

//        餐厅座位
        diningRoom.seats = new Seat[20];
        for (int i = 0; i < diningRoom.seats.length; i++) {
            Seat seat = new Seat();
            if (i%2 == 0) {
                seat.seatNumber = i+1;
                seat.statement = 1;
                diningRoom.seats[i] = seat;
            }
            else {
                seat.seatNumber = i+1;
                seat.statement = 0;
                diningRoom.seats[i] = seat;
            }
            }




//        餐厅第一个窗口信息载入
        DishesWindow dishesWindow1 = new DishesWindow();

        dishesWindow1.id = 1;
        dishesWindow1.nowLinePepoleNuber = 3;

        HashMap<String,Dish> map1 = new HashMap<String,Dish>();

        Dish dish1 = new Dish();
        dish1.name = "水煮牛肉";
        dish1.color = "红色";
        dish1.price = (float) 6.5;
        map1.put(dish1.name,dish1);

        Dish dish2 = new Dish();
        dish2.name = "鱼香茄子";
        dish2.color = "绿色";
        dish2.price = (float) 3.8;
        map1.put(dish2.name,dish2);

        Dish dish3 = new Dish();
        dish3.name = "青椒肉丝";
        dish3.color = "绿色";
        dish3.price = (float) 5.5;
        map1.put(dish3.name,dish3);

        dishesWindow1.dishes = map1;


//        餐厅第二个窗口信息载入
        DishesWindow dishesWindow2 = new DishesWindow();

        HashMap<String,Dish> map2 = new HashMap<String,Dish>();

        dishesWindow1.id = 2;
        dishesWindow1.nowLinePepoleNuber = 0;

        Dish dish4 = new Dish();
        dish4.name = "水煮鱼";
        dish4.color = "红色";
        dish4.price = (float) 7.5;
        map2.put(dish4.name,dish4);

        Dish dish5 = new Dish();
        dish5.name = "凉拌黄瓜";
        dish5.color = "绿色";
        dish5.price = (float) 2.8;
        map2.put(dish5.name,dish5);

        Dish dish6 = new Dish();
        dish6.name = "清汤白菜";
        dish6.color = "白色";
        dish6.price = (float) 1.6;
        map2.put(dish6.name,dish6);

        dishesWindow2.dishes = map2;

//        餐厅第三个窗口信息载入
        HashMap<String,Dish> map3 = new HashMap<String,Dish>();

        DishesWindow dishesWindow3 = new DishesWindow();

        dishesWindow1.id = 3;
        dishesWindow1.nowLinePepoleNuber = 1;

        Dish dish7 = new Dish();
        dish7.name = "红椒肉丝";
        dish7.color = "红色";
        dish7.price = (float) 5.5;
        map3.put(dish7.name,dish7);

        Dish dish8 = new Dish();
        dish8.name = "土豆丝";
        dish8.color = "白色";
        dish8.price = (float) 2.4;
        map3.put(dish8.name,dish8);

        Dish dish9 = new Dish();
        dish9.name = "小萝卜";
        dish9.color = "红色";
        dish9.price = (float) 5.5;
        map3.put(dish9.name,dish9);

        Dish dish10 = new Dish();
        dish10.name = "麻婆豆腐";
        dish10.color = "红色";
        dish10.price = (float) 2.5;
        map3.put(dish10.name,dish10);

        dishesWindow3.dishes  = map3;

        diningRoom.dishesWindows = new DishesWindow[]{dishesWindow1,dishesWindow2,dishesWindow3};

        return  diningRoom;
    }
}
